﻿using JetBrains.Annotations;
using Volo.Abp.Domain.Entities;

namespace MetroManagement
{
    /// <summary>
    /// 乘车卡类
    /// </summary>
    public class Card : BasicAggregateRoot<int>
    {
        /// <summary>用户Id</summary>
        public int UserId { get; protected set; }

        /// <summary>用户名</summary>
        public string UserName { get; protected set; }

        /// <summary>身份证号</summary>
        public string IdCard { get; protected set; }

        /// <summary>联系电话</summary>
        public string Phonenumber { get; protected set; }

        /// <summary>乘车码卡号</summary>
        public string CardNum { get; protected set; }

        private Card() { }

        internal Card(
            int userId,
            [NotNull] string userName,
            [NotNull] string idCard,
            [NotNull] string phonenumber,
            [NotNull] string cardNum)
        {
            UserId = userId;
            UserName = userName;
            IdCard = idCard;
            Phonenumber = phonenumber;
            CardNum = cardNum;
        }
    }
}